<m-data-table *ngIf="result$ | async as result" [data]="result.list" [result]="result">
  <ng-container mDataTableColumn header="日志类型">
    <ng-template let-type="type_desc">
      <td>{{ type }}</td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="区域名称">
    <ng-template let-name="area_name">
      <td>{{ name }}</td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="终端别名">
    <ng-template let-name="pc_name">
      <td>{{ name }}</td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="错误码">
    <ng-template let-err_code="error_code">
      <td>{{ err_code }}</td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="终端IP">
    <ng-template let-ip="pc_ip">
      <td>{{ ip }}</td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="异常描述">
    <ng-template let-desc="description">
      <td>{{ desc }}</td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="异常时间">
    <ng-template let-created_at="created_at">
      <td>{{ created_at | date }}</td>
    </ng-template>
  </ng-container>
  <ng-container mDataTableColumn header="下载日志" [hidden]="true">
    <ng-template let-item>
      <td>
        <button mat-icon-button (click)="downloadLog(item)">
          <mat-icon>cloud_download</mat-icon>
        </button>
      </td>
    </ng-template>
  </ng-container>

  <m-pagination [length]="result.total" [pageSize]="result.pageSize" [result]="result">
  </m-pagination>
</m-data-table>
